package cn.hxzy.ownerSource.service;


import cn.hxzy.common.Result;
import cn.hxzy.entity.order.vo.SelectVo;
import cn.hxzy.entity.sourceEntity.SourceList;
import cn.hxzy.entity.sourceEntity.vo.SourceInfoVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
//import org.quartz.JobExecutionContext;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ao.Li
 * @since 2023-06-23
 */
public interface SourceListService extends IService<SourceList> {

//新增货源

    SourceList addSource(SourceList sourceList, String userId,int pwd,  Double money);



    //查询所有货源列表
    Result selectSource();

    //修改装货量
    Result updateLoadingCount(Double loadingCount, String sourceId);

    //修改卸货量
    Result updateUnloadingCount(Double unloadingCount, String sourceId);

    //修改货物余量
    Result updateGoodsHeadroom(Double goodsHeadroom, String sourceId);

    /**
     * 根据货源id查询货源
     * @param sourceId
     * @return
     */
    SourceList selectSourceById(String sourceId);


    /**
     * 根据状态查货源
     * @return
     */
    List<SourceList> isSourceListOn(String userId, Integer sourceStatus);

    /**
     * 定时任务的接口1
     * @param sourceId
     * @return
     */
//    Boolean startSource(JobExecutionContext jobExecutionContext, String sourceId);

    /**
     * 多条件查询货源
     * @param loading
     * @param unLoading
     * @param i
     * @return
     */
    Result selectMoreByTj(String loading, String unLoading, int i);

    /**
     * 修改货源状态
     * @param sourceId
     * @param status
     * @return
     */
    Boolean updateSourceStatus(String sourceId,Integer status);
    Result selectSourceByStatus();
    Result selectMoreBySiteName(SelectVo selectVo) throws JsonProcessingException;

}
